import 'package:bxultimate/domain/application/organization/OrganizationAnnouncementTemplateCreateDto.dart';

/// id : "1830436714524897345"
/// isDel : null
/// createBy : null
/// updateBy : null
/// createTime : 1725245095
/// updateTime : 1727147339
/// content : [{"textInput":"姓名","textinputplaceholder":"请输入姓名","placeholder":"请输入字段标题","placeholderTwo":"待填写者输入","type":1,"borderShow":false,"value":"","required":true},{"textInput":"性别","textinputplaceholder":"请选择性别","attributes":{"radioList":[{"icon":"tn-icon-reduce-circle-fill","name":"男","value":""},{"icon":"tn-icon-reduce-circle-fill","name":"女","value":""}]},"placeholder":"请输入字段标题","placeholderTwo":"待填写者选择","type":4,"borderShow":false,"value":"","required":true},{"textInput":"年龄","textinputplaceholder":"请输入年龄","placeholder":"请输入字段标题","placeholderTwo":"待填写者输入数字","type":2,"borderShow":false,"value":"","required":false}]
/// userIdcard : "141127199405110135"
/// templateName : "测试模板"

class OrganizationAnnouncementTemplateDto {
  OrganizationAnnouncementTemplateDto({
      String? id, 
      dynamic isDel, 
      dynamic createBy, 
      dynamic updateBy, 
      num? createTime, 
      num? updateTime, 
      List<OrganizationAnnouncementTemplateCreateDto>? content,
      String? userIdcard, 
      String? templateName,}){
    _id = id;
    _isDel = isDel;
    _createBy = createBy;
    _updateBy = updateBy;
    _createTime = createTime;
    _updateTime = updateTime;
    _content = content;
    _userIdcard = userIdcard;
    _templateName = templateName;
}

  OrganizationAnnouncementTemplateDto.fromJson(dynamic json) {
    _id = json['id'];
    _isDel = json['isDel'];
    _createBy = json['createBy'];
    _updateBy = json['updateBy'];
    _createTime = json['createTime'];
    _updateTime = json['updateTime'];
    if (json['content'] != null) {
      _content = [];
      json['content'].forEach((v) {
        _content?.add(OrganizationAnnouncementTemplateCreateDto.fromJson(v));
      });
    }
    _userIdcard = json['userIdcard'];
    _templateName = json['templateName'];
  }
  String? _id;
  dynamic _isDel;
  dynamic _createBy;
  dynamic _updateBy;
  num? _createTime;
  num? _updateTime;
  List<OrganizationAnnouncementTemplateCreateDto>? _content;
  String? _userIdcard;
  String? _templateName;
OrganizationAnnouncementTemplateDto copyWith({  String? id,
  dynamic isDel,
  dynamic createBy,
  dynamic updateBy,
  num? createTime,
  num? updateTime,
  List<OrganizationAnnouncementTemplateCreateDto>? content,
  String? userIdcard,
  String? templateName,
}) => OrganizationAnnouncementTemplateDto(  id: id ?? _id,
  isDel: isDel ?? _isDel,
  createBy: createBy ?? _createBy,
  updateBy: updateBy ?? _updateBy,
  createTime: createTime ?? _createTime,
  updateTime: updateTime ?? _updateTime,
  content: content ?? _content,
  userIdcard: userIdcard ?? _userIdcard,
  templateName: templateName ?? _templateName,
);
  String? get id => _id;
  dynamic get isDel => _isDel;
  dynamic get createBy => _createBy;
  dynamic get updateBy => _updateBy;
  num? get createTime => _createTime;
  num? get updateTime => _updateTime;
  List<OrganizationAnnouncementTemplateCreateDto>? get content => _content;
  String? get userIdcard => _userIdcard;
  String? get templateName => _templateName;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['isDel'] = _isDel;
    map['createBy'] = _createBy;
    map['updateBy'] = _updateBy;
    map['createTime'] = _createTime;
    map['updateTime'] = _updateTime;
    if (_content != null) {
      map['content'] = _content?.map((v) => v.toJson()).toList();
    }
    map['userIdcard'] = _userIdcard;
    map['templateName'] = _templateName;
    return map;
  }

}
